<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="../CSS/addContact.css" />
<title>Add Contact</title>
</head>
<body>
<form action="../NewContact" method="post"><%@ page
	import="com.limeng.domain.DAOAddress"%> <%@ page
	import="java.util.List"%> <%@ page
	import="com.limeng.model.bean.AddressB"%>


<table>
	<tr>
		<td>First Name</td>
		<td><input type="text" name="firstname"></input></td>
	</tr>
	<tr>
		<td>Last Name</td>
		<td><input type="text" name="lastname"></input></td>
	</tr>
	<tr>
		<td>Email</td>
		<td><input type="text" name="email"></input></td>
	</tr>
</table>
<table>
	<%
		List<AddressB> addressBList = DAOAddress.getInstance()
				.getAllAddressB();
		out.write("<tr>");
		out.write("<td></td>");
		out.write("<td>Street</td>");
		out.write("<td>City</td>");
		out.write("<td>Zip</td>");
		out.write("<td>Country</td>");
		out.write("</tr>");
		for (AddressB addressB : addressBList) {
			out.write("<tr>");
			out.write("<td><input type=\"radio\" name=\"groupAddress\" value=\""+addressB.getAddressID()+"\"></input>");
			out.write("<td>" + addressB.getStreet() + "</td>");
			out.write("<td>" + addressB.getCity() + "</td>");
			out.write("<td>" + addressB.getZip() + "</td>");
			out.write("<td>" + addressB.getCountry() + "</td>");
			out.write("</tr>");
		}
	%>

</table>
<input type="submit" name="Sumbit"></input></form>
</body>
</html>